const { contextBridge, ipcRenderer } = require('electron');

window.addEventListener('DOMContentLoaded', () => {
  contextBridge.exposeInMainWorld('page', {
    onSearch: (name) => ipcRenderer.invoke('page:on-search', name),
    onStart: (id) => ipcRenderer.invoke('page:on-start', id),
  })
})
